 package com.zx.cloud.controller.client;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.domain.LoanOrder;
import com.zx.cloud.domain.RepayOrder;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.model.response.Response;
import com.zx.cloud.util.Page;

/**
 * 
 * @ClassName: LoanClient
 * @Description: 
 * @author: likun
 * @date: 2017年11月1日 下午6:56:16
 */
@FeignClient(name = LoanClient.SERVICE_ID, fallback = LoanClientFallback.class)
public interface LoanClient {
	
    /**
     * eureka service name
     */
    String SERVICE_ID = "trade-provider";
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/getLoanOrderList", method = RequestMethod.POST)
	ObjectDataResponse<Page<LoanOrder>> getLoanOrderList(LoanOrder loanOrder);

    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/getLoanOrderDetail", method = RequestMethod.POST)
	ObjectDataResponse<LoanOrder> getLoanOrderDetail(LoanOrder loanOrder);

    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/getMyLoanOrderList", method = RequestMethod.POST)
	ObjectDataResponse<Page<LoanOrder>> getMyLoanOrderList(LoanOrder loanOrder);

    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/doLending", method = RequestMethod.POST)
	ObjectDataResponse<Integer> doLending(LoanOrder loanOrder);

    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/getLendingOrderList", method = RequestMethod.POST)
    ObjectDataResponse<Page<LoanOrder>> getLendingOrderList(LoanOrder loanOrder);

    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/checkLoanOrder", method = RequestMethod.POST)
	ObjectDataResponse<Integer> checkLoanOrder(LoanOrder loanOrder);

    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/loan/createLoanOrder", method = RequestMethod.POST)
	ObjectDataResponse<Integer> createLoanOrder(LoanOrder loanOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/repay/getRepayOrderList", method = RequestMethod.POST)
    ObjectDataResponse<Page<RepayOrder>> getRepayOrderList(RepayOrder repayOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/repay/getRepayOrderDetail", method = RequestMethod.POST)
    ObjectDataResponse<RepayOrder> getRepayOrderDetail(RepayOrder repayOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/repay/repayrRemark", method = RequestMethod.POST)
    ObjectDataResponse<Integer>repayrRemark(RepayOrder repayOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/repay/repaySendSMS", method = RequestMethod.POST)
    ObjectDataResponse<Integer> repaySendSMS(RepayOrder repayOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/repay/getOverdueOrderList", method = RequestMethod.POST)
    ObjectDataResponse<Page<RepayOrder>> getOverdueOrderList(RepayOrder repayOrder);
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/repay/handBuildOverdue", method = RequestMethod.POST)
    ObjectDataResponse<Integer> handBuildOverdue();
    
    @RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX+"/repay/handWithhold", method = RequestMethod.POST)
	ObjectDataResponse<Integer> handWithhold();

}
